package com.zw.mizhe.model.impl;

import com.zw.mizhe.api.ApiServiceManager;
import com.zw.mizhe.api.BaseSubscriber;
import com.zw.mizhe.bean.temai.HomeEntity;
import com.zw.mizhe.model.IHomeModel;

import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;


public class HomeModelImpl implements IHomeModel {

    @Override
    public void getHomeData(int page, String type, String path, BaseSubscriber<HomeEntity> subscriber) {
        ApiServiceManager.getInstance()
                .getApiService()
                .getTeMaiData(page, type, path)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(subscriber)
        ;
    }
}
